package org.darkforest.common.services;

import org.darkforest.model.Goods;

import java.util.List;

/**
 * Created by valentina on 15/5/13.
 * 常用商品读写redis
 */
public interface GoodsRedisService {

    public static final int maxNum = 8;
    public static final String COMMEND_GOODS = "goods_list_commend";
    public static final String HOT_GOODS = "goods_list_hot";
    public static final String NEW_GOODS = "goods_list_new";

    /**
     * 初始化首页所需商品列表
     */
    public void initMainGoods();

    /**
     * 获取推荐商品列表 首页使用
     * @return
     */
    public List<Goods> getHomePageGoodsList(Integer maxNum, String listType);

    /**
     * 获取首页商品按分类区分的商品列表
     * @return
     */
    List<List<Goods>> getGoodsListByCls();

    public int getGoodsListSize(String key);
}
